// 登录
export function login(data) {
  return uni.$ylRequest({
    url: '/sys/mLogin',
    method: 'post',
    data: data,
  });
}
// 退出
export function logout(data) {
  return uni.$ylRequest({
    url: '/sys/logout',
    method: 'post',
    data: data,
  });
}
// 动态列表分页查询
export function hyDemand(data) {
  return uni.$ylRequest({
    url: '/bmdb/hyDynamic/list',
    method: 'get',
    data: data,
  });
}
// 动态列表部门结构
export function queryTreeList(data) {
  return uni.$ylRequest({
    url: '/sys/sysDepart/queryTreeList',
    method: 'get',
    data: data,
  });
}
// 动态表详情
export function queryById(data) {
  return uni.$ylRequest({
    url: '/bmdb/hyDynamic/queryById',
    method: 'get',
    data: data,
  });
}
// 排行信息
export function getRankInfo(data) {
  return uni.$ylRequest({
    url: '/bmdb/hyRank/getRankInfo',
    method: 'post',
    data: data,
  });
}
// 需求列表
export function hyDemandList(data) {
  return uni.$ylRequest({
    url: '/bmdb/hyDemand/list',
    method: 'get',
    data: data,
  });
}
export function getRejectList(data) {
  return uni.$ylRequest({
    url: '/bmdb/hyUser/getRejectList',
    method: 'get',
    data: data,
  });
}
// 需求详情
export function hyDemandQueryById(data) {
  return uni.$ylRequest({
    url: '/bmdb/hyDemand/queryById',
    method: 'get',
    data: data,
  });
}
// 消息
export function hyUserGetMessage(data) {
  return uni.$ylRequest({
    url: '/bmdb/hyUser/getMessage',
    method: 'get',
    data: data,
  });
}
// 任务
export function hyUserGetTaskInfo(data) {
  return uni.$ylRequest({
    url: '/bmdb/hyUser/getTaskInfo',
    method: 'get',
    data: data,
  });
}
// 动态添加
export function add(data) {
  return uni.$ylRequest({
    url: '/bmdb/hyDynamic/add',
    method: 'post',
    data: data,
  });
}
// 文件上传
export function upload(data) {
  return uni.$ylUpload({
    url: '/bmdb/upload',
    method: 'post',
    files: data.files,
  });
}
// 新增需求
export function addHyDemand(data) {
  return uni.$ylRequest({
    url: '/bmdb/hyDemand/add',
    method: 'post',
    data: data,
  });
}
// 动态表编辑
export function edit(data) {
  return uni.$ylRequest({
    url: '/bmdb/hyDynamic/edit',
    method: 'post',
    data: data,
  });
}
// 动态二维码
export function bmdb(data) {
  return uni.$ylRequest({
    url: '/bmdb/hyPartyRegistration/addOrEdit',
    method: 'post',
    data: data,
  });
}
// 动态二维码
export function thumbsUp(data) {
  return uni.$ylRequest({
    url: '/bmdb/hyDynamicUserThumb/thumbsUp',
    method: 'get',
    data: data,
  });
}
// 用户点击动态表-添加
export function hyUserClick(data) {
  return uni.$ylRequest({
	url: '/bmdb/hyUserClick/add',
	method: 'post',
	data: data,
  });
}
// 动态修改
export function editHydynamic(data) {
	return uni.$ylRequest({
		url: '/bmdb/hyDynamic/edit',
		method: 'post',
		data: data,
	});
}
// 密码修改
export function changePassword(data) {
  return uni.$ylRequest({
    url: '/sys/user/changePasswordByAPP',
    method: 'put',
    data: data,
  });
}
// 根据父id查询子部门
export function queryDepartTreeSync(data) {
  return uni.$ylRequest({
    url: '/sys/sysDepart/queryDepartTreeSync',
    method: 'get',
    data: data,
  });
}
// 获取未读任务和消息数量
export function getTaskNumber(data) {
  return uni.$ylRequest({
    url: '/bmdb/hyUser/getTaskNumber',
    method: 'get',
    data: data,
  });
}
// 需求修改
export function editDemand(data) {
  return uni.$ylRequest({
    url: '/bmdb/hyDemand/edit',
    method: 'post',
    data: data,
  });
}
// 用户消息点击表-添加
export function hyUserMessageClick(data) {
  return uni.$ylRequest({
	url: '/bmdb/hyUserMessageClick/add',
	method: 'post',
	data: data,
  });
}
// 获取报名名单
export function getRegistrationList(data) {
  return uni.$ylRequest({
    url: '/bmdb/hyUser/getRegistrationList',
    method: 'get',
    data: data,
  });
}
// 根据动态id获取活动名单
export function getPartyInfo(data) {
  return uni.$ylRequest({
    url: '/bmdb/hyPartyRegistration/getPartyInfo',
    method: 'get',
    data: data,
  });
}
// 排行动态接口
export function getDynamicList(data) {
  return uni.$ylRequest({
    url: '/bmdb/hyRank/getDynamicList',
    method: 'get',
    data: data,
  });
}
export default {
  add,
  upload,
  login,
  logout,
  hyDemand,
  queryTreeList,
  queryById,
  getRankInfo,
  hyDemandList,
  hyUserGetTaskInfo,
  hyUserGetMessage,
  addHyDemand,
  edit,
  bmdb,
  thumbsUp,
  editHydynamic,
  getRejectList,
  changePassword,
  queryDepartTreeSync,
  getTaskNumber,
  editDemand,
  hyUserMessageClick,
  getRegistrationList,
  getPartyInfo,
  getDynamicList,
};
